package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbFactoryMapper;
import com.ruoyi.system.domain.TbFactory;
import com.ruoyi.system.service.ITbFactoryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 供应厂商列Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-06-28
 */
@Service
public class TbFactoryServiceImpl implements ITbFactoryService 
{
    @Autowired
    private TbFactoryMapper tbFactoryMapper;

    /**
     * 查询供应厂商列
     * 
     * @param fid 供应厂商列ID
     * @return 供应厂商列
     */
    @Override
    public TbFactory selectTbFactoryById(Long fid)
    {
        return tbFactoryMapper.selectTbFactoryById(fid);
    }

    /**
     * 查询供应厂商列列表
     * 
     * @param tbFactory 供应厂商列
     * @return 供应厂商列
     */
    @Override
    public List<TbFactory> selectTbFactoryList(TbFactory tbFactory)
    {
        return tbFactoryMapper.selectTbFactoryList(tbFactory);
    }

    /**
     * 新增供应厂商列
     * 
     * @param tbFactory 供应厂商列
     * @return 结果
     */
    @Override
    public int insertTbFactory(TbFactory tbFactory)
    {
        return tbFactoryMapper.insertTbFactory(tbFactory);
    }

    /**
     * 修改供应厂商列
     * 
     * @param tbFactory 供应厂商列
     * @return 结果
     */
    @Override
    public int updateTbFactory(TbFactory tbFactory)
    {
        return tbFactoryMapper.updateTbFactory(tbFactory);
    }

    /**
     * 删除供应厂商列对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTbFactoryByIds(String ids)
    {
        return tbFactoryMapper.deleteTbFactoryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除供应厂商列信息
     * 
     * @param fid 供应厂商列ID
     * @return 结果
     */
    @Override
    public int deleteTbFactoryById(Long fid)
    {
        return tbFactoryMapper.deleteTbFactoryById(fid);
    }
}
